<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: mdf::ISampleObserver Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacemdf.html">mdf</a></li><li class="navelem"><a class="el" href="classmdf_1_1_i_sample_observer.html">ISampleObserver</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classmdf_1_1_i_sample_observer-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">mdf::ISampleObserver Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Interface to a sample observer that handle incoming samples events.  
</p>

<p><code>#include &lt;<a class="el" href="isampleobserver_8h_source.html">isampleobserver.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for mdf::ISampleObserver:</div>
<div class="dyncontent">
<div class="center"><img src="classmdf_1_1_i_sample_observer__inherit__graph.png" border="0" usemap="#amdf_1_1_i_sample_observer_inherit__map" alt="Inheritance graph"/></div>
<map name="amdf_1_1_i_sample_observer_inherit__map" id="amdf_1_1_i_sample_observer_inherit__map">
<area shape="rect" title="Interface to a sample observer that handle incoming samples events." alt="" coords="7,5,156,31"/>
<area shape="rect" href="classmdf_1_1_i_channel_observer.html" title="The channel observer object shall hold all samples for a channel." alt="" coords="5,79,157,104"/>
<area shape="poly" title=" " alt="" coords="84,44,84,79,79,79,79,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for mdf::ISampleObserver:</div>
<div class="dyncontent">
<div class="center"><img src="classmdf_1_1_i_sample_observer__coll__graph.png" border="0" usemap="#amdf_1_1_i_sample_observer_coll__map" alt="Collaboration graph"/></div>
<map name="amdf_1_1_i_sample_observer_coll__map" id="amdf_1_1_i_sample_observer_coll__map">
<area shape="rect" title="Interface to a sample observer that handle incoming samples events." alt="" coords="5,168,155,193"/>
<area shape="rect" href="classmdf_1_1_i_data_group.html" title="Interface to a data group (DG) block." alt="" coords="22,80,138,105"/>
<area shape="poly" title=" " alt="" coords="83,119,83,167,77,167,77,119"/>
<area shape="rect" href="classmdf_1_1_i_block.html" title="Base class for all MDF blocks." alt="" coords="37,5,123,31"/>
<area shape="poly" title=" " alt="" coords="83,45,83,80,77,80,77,45"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad4d01478f4c03c6c46fc814e13733b95" id="r_ad4d01478f4c03c6c46fc814e13733b95"><td class="memItemLeft" align="right" valign="top"><a id="ad4d01478f4c03c6c46fc814e13733b95" name="ad4d01478f4c03c6c46fc814e13733b95"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ISampleObserver</b> (const <a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;data_group)</td></tr>
<tr class="memdesc:ad4d01478f4c03c6c46fc814e13733b95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sample observer constructor. <br /></td></tr>
<tr class="separator:ad4d01478f4c03c6c46fc814e13733b95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a159b481cf73aea99311e77e9ef49e08b" id="r_a159b481cf73aea99311e77e9ef49e08b"><td class="memItemLeft" align="right" valign="top"><a id="a159b481cf73aea99311e77e9ef49e08b" name="a159b481cf73aea99311e77e9ef49e08b"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><b>~ISampleObserver</b> ()</td></tr>
<tr class="memdesc:a159b481cf73aea99311e77e9ef49e08b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a159b481cf73aea99311e77e9ef49e08b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b3f2246ffc18810c5bd0f0ba638a34d" id="r_a1b3f2246ffc18810c5bd0f0ba638a34d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1b3f2246ffc18810c5bd0f0ba638a34d">AttachObserver</a> ()</td></tr>
<tr class="memdesc:a1b3f2246ffc18810c5bd0f0ba638a34d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach the observer to an observer list (publisher).  <br /></td></tr>
<tr class="separator:a1b3f2246ffc18810c5bd0f0ba638a34d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a1271fd85e2d576b51b4af717653eff" id="r_a9a1271fd85e2d576b51b4af717653eff"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9a1271fd85e2d576b51b4af717653eff">DetachObserver</a> ()</td></tr>
<tr class="memdesc:a9a1271fd85e2d576b51b4af717653eff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detach the observer from an observer list.  <br /></td></tr>
<tr class="separator:a9a1271fd85e2d576b51b4af717653eff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e1b137263f56d586e728b4d602925f1" id="r_a8e1b137263f56d586e728b4d602925f1"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8e1b137263f56d586e728b4d602925f1">OnSample</a> (uint64_t sample, uint64_t record_id, const std::vector&lt; uint8_t &gt; &amp;record)</td></tr>
<tr class="memdesc:a8e1b137263f56d586e728b4d602925f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Observer function that receives the sample record and parse out a channel value.  <br /></td></tr>
<tr class="separator:a8e1b137263f56d586e728b4d602925f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae41e0b9a800313fc8ed9fd4092ef45d8" id="r_ae41e0b9a800313fc8ed9fd4092ef45d8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae41e0b9a800313fc8ed9fd4092ef45d8">IsRecordIdNeeded</a> (uint64_t record_id) const</td></tr>
<tr class="memdesc:ae41e0b9a800313fc8ed9fd4092ef45d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that test if this observer needs to read a specific record.  <br /></td></tr>
<tr class="separator:ae41e0b9a800313fc8ed9fd4092ef45d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5370d41a04767162b5d8fcc1d0a3ed5d" id="r_a5370d41a04767162b5d8fcc1d0a3ed5d"><td class="memTemplParams" colspan="2">template&lt;typename V &gt; </td></tr>
<tr class="memitem:a5370d41a04767162b5d8fcc1d0a3ed5d"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a5370d41a04767162b5d8fcc1d0a3ed5d">GetChannelValue</a> (const <a class="el" href="classmdf_1_1_i_channel.html">IChannel</a> &amp;channel, uint64_t sample, const std::vector&lt; uint8_t &gt; &amp;record, V &amp;value, uint64_t array_index=0) const</td></tr>
<tr class="memdesc:a5370d41a04767162b5d8fcc1d0a3ed5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function returns a channel value.  <br /></td></tr>
<tr class="separator:a5370d41a04767162b5d8fcc1d0a3ed5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec5ffbdc7caae38e85dc54361d68c057" id="r_aec5ffbdc7caae38e85dc54361d68c057"><td class="memTemplParams" colspan="2">template&lt;typename V &gt; </td></tr>
<tr class="memitem:aec5ffbdc7caae38e85dc54361d68c057"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#aec5ffbdc7caae38e85dc54361d68c057">GetEngValue</a> (const <a class="el" href="classmdf_1_1_i_channel.html">IChannel</a> &amp;channel, uint64_t sample, const std::vector&lt; uint8_t &gt; &amp;record, V &amp;value, uint64_t array_index=0) const</td></tr>
<tr class="memdesc:aec5ffbdc7caae38e85dc54361d68c057"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the scaled sample value for the channel with the record bytes as input. This function is mainly for internal use but is used together with sample observers.  <br /></td></tr>
<tr class="separator:aec5ffbdc7caae38e85dc54361d68c057"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a97f0554517ca72e503543eb2e0efc236" id="r_a97f0554517ca72e503543eb2e0efc236"><td class="memItemLeft" align="right" valign="top">std::function&lt; bool(uint64_t sample, uint64_t record_id, const std::vector&lt; uint8_t &gt; &amp;record)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a97f0554517ca72e503543eb2e0efc236">DoOnSample</a></td></tr>
<tr class="memdesc:a97f0554517ca72e503543eb2e0efc236"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function object that is called if assigned.  <br /></td></tr>
<tr class="separator:a97f0554517ca72e503543eb2e0efc236"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a87722b22726b87c6f30e03958a193c57" id="r_a87722b22726b87c6f30e03958a193c57"><td class="memItemLeft" align="right" valign="top"><a id="a87722b22726b87c6f30e03958a193c57" name="a87722b22726b87c6f30e03958a193c57"></a>
std::set&lt; uint64_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>record_id_list_</b></td></tr>
<tr class="memdesc:a87722b22726b87c6f30e03958a193c57"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of subscribed channel groups. <br /></td></tr>
<tr class="separator:a87722b22726b87c6f30e03958a193c57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12b62a5469fdaa2ec68af57ea0d9f4d9" id="r_a12b62a5469fdaa2ec68af57ea0d9f4d9"><td class="memItemLeft" align="right" valign="top"><a id="a12b62a5469fdaa2ec68af57ea0d9f4d9" name="a12b62a5469fdaa2ec68af57ea0d9f4d9"></a>
const <a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>data_group_</b></td></tr>
<tr class="memdesc:a12b62a5469fdaa2ec68af57ea0d9f4d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to the data group (DG) block. <br /></td></tr>
<tr class="separator:a12b62a5469fdaa2ec68af57ea0d9f4d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a1b3f2246ffc18810c5bd0f0ba638a34d" name="a1b3f2246ffc18810c5bd0f0ba638a34d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b3f2246ffc18810c5bd0f0ba638a34d">&#9670;&#160;</a></span>AttachObserver()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mdf::ISampleObserver::AttachObserver </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function is normally called in the constructor of an observer, so there is normally no need to call it. </p>

</div>
</div>
<a id="a9a1271fd85e2d576b51b4af717653eff" name="a9a1271fd85e2d576b51b4af717653eff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a1271fd85e2d576b51b4af717653eff">&#9670;&#160;</a></span>DetachObserver()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mdf::ISampleObserver::DetachObserver </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function detach the observer from the observer list. This function shall be called when <a class="el" href="#a8e1b137263f56d586e728b4d602925f1" title="Observer function that receives the sample record and parse out a channel value.">OnSample()</a> function is not needed anymore. This function is needed to handle dangling pointers. For example it is called after the ReadData() function in a reader. </p>

</div>
</div>
<a id="a5370d41a04767162b5d8fcc1d0a3ed5d" name="a5370d41a04767162b5d8fcc1d0a3ed5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5370d41a04767162b5d8fcc1d0a3ed5d">&#9670;&#160;</a></span>GetChannelValue()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename V &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::ISampleObserver::GetChannelValue </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmdf_1_1_i_channel.html">IChannel</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>channel</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>sample</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>record</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">V &amp;</td>          <td class="paramname"><span class="paramname"><em>value</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>array_index</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span>&#160;) const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Use this function to get a channel value from a sample record buffer. Note that the array index should only be used if the channel is a so-called channel array (CA block). </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">V</td><td>Type of value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">channel</td><td>Reference to a channel. </td></tr>
    <tr><td class="paramname">sample</td><td>Sample number (0..N). </td></tr>
    <tr><td class="paramname">record</td><td>Record buffer. </td></tr>
    <tr><td class="paramname">value</td><td>Reference to the returning value. </td></tr>
    <tr><td class="paramname">array_index</td><td>Array index in case of an array channel object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the value is valid. </dd></dl>

</div>
</div>
<a id="aec5ffbdc7caae38e85dc54361d68c057" name="aec5ffbdc7caae38e85dc54361d68c057"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec5ffbdc7caae38e85dc54361d68c057">&#9670;&#160;</a></span>GetEngValue()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename V &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::ISampleObserver::GetEngValue </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmdf_1_1_i_channel.html">IChannel</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>channel</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>sample</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>record</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">V &amp;</td>          <td class="paramname"><span class="paramname"><em>value</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>array_index</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span>&#160;) const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The engineering value is the scaled value of the channel value. The attached conversion block defines the type of scaling to apply. Note that the channel value and the scaled value may have different type and unit.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">V</td><td>Type of value to return. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">channel</td><td>Reference to the channel. </td></tr>
    <tr><td class="paramname">sample</td><td>Sample index. </td></tr>
    <tr><td class="paramname">record</td><td>Record data bytes excluding the record ID bytes </td></tr>
    <tr><td class="paramname">value</td><td>Returns the scaled value. </td></tr>
    <tr><td class="paramname">array_index</td><td>Optional array index in case of channel array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return true if the value is valid. </dd></dl>

</div>
</div>
<a id="ae41e0b9a800313fc8ed9fd4092ef45d8" name="ae41e0b9a800313fc8ed9fd4092ef45d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae41e0b9a800313fc8ed9fd4092ef45d8">&#9670;&#160;</a></span>IsRecordIdNeeded()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::ISampleObserver::IsRecordIdNeeded </td>
          <td>(</td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>record_id</em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">nodiscard</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">record_id</td><td>The channel groups record ID </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if this channel subscribe on this record (channel group). </dd></dl>

</div>
</div>
<a id="a8e1b137263f56d586e728b4d602925f1" name="a8e1b137263f56d586e728b4d602925f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e1b137263f56d586e728b4d602925f1">&#9670;&#160;</a></span>OnSample()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool mdf::ISampleObserver::OnSample </td>
          <td>(</td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>sample</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t</td>          <td class="paramname"><span class="paramname"><em>record_id</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>record</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The function may be override by an inheritance for more complex implementations but in simpler use cases the DoOnSample function should be used instead.</p>
<p>The function normally returns true indicating that more reading is expected. If any observer want to stop further parsing, the function should return false.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sample</td><td>Sample number. </td></tr>
    <tr><td class="paramname">record_id</td><td>Record ID (channel group identity). </td></tr>
    <tr><td class="paramname">record</td><td>Sample record (excluding the record ID. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If this function returns false it indicate that reading should be aborted. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a97f0554517ca72e503543eb2e0efc236" name="a97f0554517ca72e503543eb2e0efc236"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97f0554517ca72e503543eb2e0efc236">&#9670;&#160;</a></span>DoOnSample</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt;bool(uint64_t sample, uint64_t record_id, const std::vector&lt;uint8_t&gt;&amp; record)&gt; mdf::ISampleObserver::DoOnSample</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The function object is typically assigned to a lambda function. See also <a class="el" href="#a8e1b137263f56d586e728b4d602925f1" title="Observer function that receives the sample record and parse out a channel value.">OnSample()</a> function. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/mdf/<a class="el" href="isampleobserver_8h_source.html">isampleobserver.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
